package com.niuwa.p2p.core.constant;

/**
 * 
 * @title 任务调度分组job
 * @author tennyqin
 * @version 1.0
 * @created 2015年3月27日
 */
public enum JobGroupEnum implements IEnum {

	Nomal(1, "一般服务"), Timer(2, "定时服务");
	private int value;
	private String text;

	private JobGroupEnum(int value, String text) {
		this.value = value;
		this.text = text;
	}

	@Override
	public int getValue() {
		return this.value;
	}

	@Override
	public String getText() {
		return this.text;
	}

	@Override
	public String toString() {
		return this.getText();
	}

	public static JobGroupEnum valueOf(int value) {
		for (JobGroupEnum e : JobGroupEnum.values()) {
			if (e.getValue() == value) {
				return e;
			}
		}
		return null;
	}

}
